<script setup>
import {useRoute} from 'vue-router'
import {inject, ref} from 'vue'
import axios from 'axios'

const route=useRoute()
const path_list=inject('path_list')
path_list.value=route.matched

const data=ref()
axios.get('/api/oa/total').then(res=>{
    data.value=res.data
}).catch(err=>{
    ElMessage.error(err)
})
</script>
<template>
    <el-tree style="width:100%;" :data="data">
        <template #default="{node, data}">
            <span v-if="data.label">{{ data.label }}</span>
            <a v-else :title="'id:'+data.id+'\n'+'loginid:'+data.loginid">{{data.lastname}}</a>
        </template>
    </el-tree>
</template>
<script lang="scss" scoped>

</script>